import request from '@/utils/request'

// 查询发布审核列表
export function listPosting(query) {
  return request({
    url: '/wallpaper/posting/list',
    method: 'get',
    params: query
  })
}

// 查询发布审核详细
export function getPosting(id) {
  return request({
    url: '/wallpaper/posting/' + id,
    method: 'get'
  })
}

// 新增发布审核
export function addPosting(data) {
  return request({
    url: '/wallpaper/posting',
    method: 'post',
    data: data
  })
}

// 修改发布审核
export function updatePosting(data) {
  return request({
    url: '/wallpaper/posting',
    method: 'put',
    data: data
  })
}

// 删除发布审核
export function delPosting(id) {
  return request({
    url: '/wallpaper/posting/' + id,
    method: 'delete'
  })
}


/**
 * 用户发布壁纸
 * @param {Object} params
 */
export function apiPostingWallpaper(params) {
  return request({
    url:  '/wallpaper/posting/wallpaper',
    method: 'POST',
    data: params,
  })
}

/**
 * 用户发布专辑
 * @param {Object} params
 */
export function apiPostingAlbum(params) {
  return request({
    url:  '/wallpaper/posting/album',
    method: 'POST',
    data: params,
  })
}
